home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / WASTE 1.2a4 / WASTE Demo / WEDemoDrags.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-27  |  858 b   |  44 lines  |  [TEXT/CWIE]

  1. /*
  2.     WASTE Demo Project:
  3.     Drag Handlers
  4.         
  5.     Copyright © 1993-1995 Marco Piovanelli
  6.     All Rights Reserved
  7.  
  8.     C port by John C. Daub
  9. */
  10.  
  11. #ifndef __WEDEMOAPP__
  12. #include "WEDemoIntf.h"
  13. #endif
  14.  
  15.  
  16. pascal OSErr    MyTrackingHandler( DragTrackingMessage message, WindowRef window, void *refCon, DragReference drag )
  17. {
  18. #pragma unused (refCon)
  19.  
  20.     DocumentHandle    hDocument;
  21.     OSErr            err;
  22.     
  23.     if ((window != NULL) && ((hDocument = GetWindowDocument(window)) != NULL))
  24.         err = WETrackDrag( message, drag, (*hDocument)->we );
  25.     else
  26.         err = noErr;
  27.     
  28.     return err;
  29. }
  30.  
  31. pascal OSErr    MyReceiveHandler( WindowRef window, void *refCon, DragReference drag )
  32. {
  33. #pragma unused (refCon)
  34.  
  35.     DocumentHandle    hDocument;
  36.     OSErr            err;
  37.     
  38.     if ((window != NULL) && ((hDocument = GetWindowDocument(window)) != NULL))
  39.         err = WEReceiveDrag( drag, (*hDocument)->we );
  40.     else
  41.         err = noErr;
  42.     
  43.     return err;
  44. }